#ifndef RECEIVINGFORMDIALOG_H
#define RECEIVINGFORMDIALOG_H

#include <QDialog>
#include <QCloseEvent>
namespace Ui {
class ReceivingFormDialog;
}

class ReceivingFormDialog : public QDialog
{
    Q_OBJECT

public:
    explicit ReceivingFormDialog(QWidget *parent = nullptr);
    ~ReceivingFormDialog();

signals:
    //自定义信号,通知主窗口对话框已经关闭
    void reportDialogClosed();
private slots:
    void on_buttonBox_accepted();

    void on_buttonBox_rejected();

    //加载采购订单信息
    void onOrderSelected(const QString &orderId);

private:
    Ui::ReceivingFormDialog *ui;
    //重写关闭事件
    void closeEvent(QCloseEvent *event);

    //初始化数据
    void initData();

    //提交验收单
    void onSubmit();

    //清空采购订单详情
    void clearOrderInfo();
};

#endif // RECEIVINGFORMDIALOG_H
